Communication apparatus and method for controlling the same

ABSTRACT

A communication apparatus automatically stops operating in a direct wireless communication mode in conjunction with a user&#39;s logging out from the communication apparatus.

TECHNICAL FIELD

The present invention relates to a communication apparatus and a methodfor controlling the same.

BACKGROUND ART

Communication apparatuses such as smartphones, portable game machines,and printers have a wireless local area network (LAN) function. In thewireless LAN function, there is known a direct wireless communicationmode of directly connecting a plurality of communication apparatuseswithout having an access point therebetween. PTL 1 discloses aconfiguration where a printer and a mobile terminal are directlyconnected using an access point mode, which is one example of the directwireless communication mode.

To use the direct wireless communication mode, the user needs toinstruct a communication apparatus to start operating in the directwireless communication mode. For example, the communication apparatusdisplays a “start button” for starting the operation in the directwireless communication mode. When the user presses the “start button”,the communication apparatus starts operating in the direct wirelesscommunication mode. To end the use of the direct wireless communicationmode, the user instructs the communication apparatus to stop operatingin the direct wireless communication mode. For example, thecommunication apparatus displays a “stop button” for stopping theoperation in the direct wireless communication mode. When the userpresses the “stop button”, the communication apparatus stops operatingin the direct wireless communication mode.

In communication apparatuses of the related art, the operation in thedirect wireless communication mode is not stopped until the user pressesthe “stop button” even when it can be determined that the user has endedthe use of the direct wireless communication mode.

CITATION LIST Patent Literature

PTL 1: Japanese Patent Laid-Open No. 2015-023440

SUMMARY OF INVENTION

The present invention provides a communication apparatus to which a usercan log in, including: a wireless communication unit configured toinclude a direct wireless communication function of performing wirelesscommunication with an external device without having a relay devicetherebetween; a determination unit configured to determine, inaccordance with a number of wireless connections established by thedirect wireless communication function, whether to stop the directwireless communication function in response to the user's logging outfrom the communication apparatus; and a controller configured to controlthe wireless communication unit to stop the direct wirelesscommunication function in response to determining by the determinationunit to stop the direct wireless communication function.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a diagram illustrating the outline of a communication system.

FIG. 2 is a diagram illustrating the hardware configuration of aprinter.

FIG. 3A is a diagram illustrating a screen displayed by the printer.

FIG. 3B is a diagram illustrating a screen displayed by the printer.

FIG. 3C is a diagram illustrating a screen displayed by the printer.

FIG. 4 is a diagram illustrating a user management table.

FIG. 5A is a diagram illustrating a wireless connection screen.

FIG. 5B is a diagram illustrating a wireless connection screen.

FIG. 6 is a flowchart illustrating a process regarding userauthentication.

FIG. 7 is a flowchart illustrating a process regarding operation in anaccess point mode.

FIG. 8 is a flowchart illustrating a process regarding operation in theaccess point mode.

DESCRIPTION OF EMBODIMENTS

Hereinafter, embodiments of the present invention will be describedusing the drawings. The following embodiments are not construed to limitthe invention according to the appended claims, and all combinations ofthe features described in the embodiments are not necessarily required.

First Embodiment

Referring to FIG. 1, the outline of a communication system will bedescribed. The communication system according to a first embodimentincludes a printer 100 and a mobile terminal 101.

The printer 100 has a wireless LAN function. The wireless LAN functionof the printer 100 has two wireless communication modes, that is, aninfrastructure mode and an access point mode. The infrastructure mode isa wireless communication mode where the printer 100 connects wirelesslyto a relay device such as an access point (not illustrated) andcommunicates with a device such as a personal computer (PC) on anetwork.

In contrast, the access point mode is a wireless communication modewhere a software access point is activated on the printer 100 and theprinter 100 itself acts as an access point. The mobile terminal 101 suchas a smartphone wirelessly connects to the printer 100 operating in theaccess point mode and transmits print data for printing an electronicfile such as a photograph to the printer 100. With the access pointmode, wireless communication can be performed directly between theprinter 100 and the mobile terminal 101, without having a relay devicesuch as an access point therebetween. Note that the access point mode isan example of a direct wireless communication mode of establishingwireless connection directly between the printer 100 and the mobileterminal 101. Instead of the access point mode, other wirelesscommunication systems such as Wi-Fi Direct (registered trademark) may beapplied to the first embodiment.

The printer 100 has a user authenticating function, which will bedescribed in detail later. The user logs in to the printer 100 with theuser authenticating function. The user who has logged in to the printer100 can use the access point mode. When the user logs out from theprinter 100, the printer 100 stops operating in the access point inconjunction with the user's logging out.

Referring next to FIG. 2, the hardware configuration of the printer 100will be described. A central processing unit (CPU) 201 reads a controlprogram stored in a read-only memory (ROM) 202 and executes variousprocesses for controlling the operation of the printer 100. The ROM 202stores the control program. A random-access memory (RAM) 203 is used asa temporary storage area such a main memory or a work area for the CPU201. A hard disk drive (HDD) 204 is a non-volatile storage medium forstoring various types of data.

Although one CPU 201 executes processes illustrated in later-describedflowcharts in the case of the printer 100, other modes are alsoconceivable. For example, a plurality of CPUs may cooperate to executethe processes illustrated in the later-described flowcharts.Alternatively, part or some of the processes illustrated in thelater-described flowcharts may be executed using a hardware circuit suchas an application-specific integrated circuit (ASIC).

A wireless LAN interface (I/F) 205 executes wireless LAN communicationbetween the mobile terminal 101 and an external device such as an accesspoint. Wireless LAN communication executed by the wireless LAN I/F 205is wireless communication such as Institute of Electrical andElectronics Engineers (IEEE) 802.11 a/b/g/n/ac. The wireless LAN I/F 205is operable in the infrastructure mode and the access point mode. Thewireless LAN I/F 205 selects one of the infrastructure mode and theaccess point mode in accordance with device settings configured inadvance by the user, and operates in the selected mode.

A network I/F 210 connects to a wired LAN via a LAN cable. The networkI/F 210 is capable of communicating with an external device (such as aPC) on the wired LAN.

A printing section 206 executes printing on a sheet on the basis ofprint data received by the wireless LAN I/F 205 or the network I/F 210.A scanning section 207 scans a document placed by the user and generatesa document image. The document image generated by the scanning section207 is printed (so-called copied) by the printing section 206 oraccumulated in the HDD 204.

An operating section 208 includes a liquid crystal display (LCD) with atouchscreen function and a keyboard, and displays various operationscreens. The user can input instructions and information to the printer100 via the operating section 208.

An integrated circuit (IC) card reader 209 reads user information froman IC card. In the case of the first embodiment, a user ID and apassword are stored as user information in an IC card. The printer 100executes user authentication on the basis of user information read bythe IC card reader 209 from an IC card.

The printer 100 is given as an example of a communication apparatusoperable in the access point mode. A communication apparatus to whichthe present invention is applicable is not limited to the printer 100.The present invention is applicable to various communication apparatusesincluding a digital camera, a camcorder, a smartphone, and a portablegame machine as long as they are operable in the access point mode.

Next, operation screens provided by the printer 100 and operationprocedures when the user uses the access point mode will be described.

A log-in screen 300 illustrated in FIG. 3A is a screen displayed by theoperating section 208 of the printer 100. When the printer 100 iscompletely activated, the operating section 208 initially displays thelog-in screen 300. The user places his/her IC card over the IC cardreader 209.

A user management table 400 illustrated in FIG. 4 is information formanaging user information (user name, user ID, and password) on a userwho is permitted to log in to the printer 100, and is stored in the HDD204 of the printer 100. A user who is registered in the user managementtable 400 can log in to the printer 100. When the user places his/her ICcard over the IC card reader 209, the IC card reader 209 reads userinformation (user ID and password) from the IC card. The CPU 201determines whether the user information, read by the IC card reader 209from the IC card, is registered in the user management table 400. Whenthe user information read from the IC card is registered in the usermanagement table 400, the user authentication is successful, and theoperating section 208 displays a menu screen 310 illustrated in FIG. 3B.The state becomes such that the user who has been successfullyauthenticated logs in to the printer 100 and can use the printer 100. Incontrast, when the user information read from the IC card is notregistered in the user management table 400, the user authenticationfailed, and the operating section 208 informs the user of theauthentication failure and does not display the menu screen 310.

In the case of the first embodiment, the user may enter his/her user IDand password in an entry field 301 and an entry field 302, without usingthe IC card reader 209. When the user enters his/her user ID andpassword in the entry field 301 and the entry field 302 and presses alog-in button 303, the printer 100 executes user authentication.

The user management table 400 may be included not in the printer 100,but in an external authentication server. When the authentication serverincludes the user management table 400, the printer 100 transmits theuser information to the authentication server. By receiving the resultof the authentication (whether the authentication is successful orfailed) from the authentication server, the printer 100 executes userauthentication.

The menu screen 310 illustrated in FIG. 3B displays buttons for the userto use functions provided by the printer 100. A log-out button 315 is abutton for the user to log out from the printer 100. When the userpresses the log-out button 315, the user who is currently logged in logsout from the printer 100. A log-out button is displayed on screensdescribed hereinafter, and the user can input a log-out instruction whenthe operating section 208 displays any of these screens.

A button 311 is a button for the user to use a copy function. When theuser presses the button 311, the operating section 208 displays a copyscreen (not illustrated).

A button 312 is a button for the user to use a send function (functionof transmitting a document image generated by the scanning section 207to an external device). When the user presses the button 312, theoperating section 208 displays a send screen (not illustrated).

A button 314 is a button for the user to configure device settings ofthe printer 100. When the user presses the button 314, the operatingsection 208 displays various setting screens in accordance with the useroperation. A setting screen 320 illustrated in FIG. 3C is one of theoperation screens provided by the printer 100 to the user, and isdisplayed by the operating section 208. Items that can be set on thesetting screen 320 will be described in detail. The setting screen 320is a screen accessible to a user who has special privileges, such as asystem administrator.

An item 321 is for setting which of a fixed service set identifier(SSID) and a one-time SSID is to be used as an SSID used in the accesspoint mode. A fixed SSID is a setting that indicates that the same SSIDis used whenever the printer 100 operates in the access point mode. Thesystem administrator enters a desired SSID in an entry field 322. Whenoperating in the access point mode, the printer 100 uses the SSIDentered in the entry field 322 as a fixed SSID. In contrast, a one-timeSSID is a setting that indicates that a random SSID is generated andthat random SSID is used.

A register button 323 is a button for reflecting the settings configuredon the setting screen 320 in the printer 100. When the systemadministrator presses the register button 323, the results of thesettings configured on the setting screen 320 are stored in the HDD 204,and the settings configured on the setting screen 320 are reflected inthe printer 100.

The description now returns to the menu screen 310. A button 313 is abutton for the user to use the access point mode. To use the accesspoint mode, the user first presses the button 313. When the user pressesthe button 313, the operating section 208 displays a wireless connectionscreen 500 illustrated in FIG. 5A.

The wireless connection screen 50(1 displays a start button 501. Thestart button 501 is a button for the user to instruct the printer 100 tostart operating in the access point mode. When the operating section 208is displaying the wireless connection screen 500, the printer 100 hasnot started operating in the access point mode. Thus, even when themobile terminal 101 searches for surrounding access points, the mobileterminal 101 cannot find the printer 100, and no wireless connection canbe established between the mobile terminal 101 and the printer 100. Toestablish wireless connection between the mobile terminal 101 and theprinter 100, the user needs to instruct the printer 100 to startoperating in the access point mode. When the user presses the startbutton 501, the printer 100 starts operating in the access point mode.The operating section 208 displays a wireless connection screen 510illustrated in FIG. 5B.

When the printer 100 starts operating in the access point mode, theprinter 100 generates an SSID and a connection key (such as a WiredEquivalent Privacy (WEP) key). A field 511 of the wireless connectionscreen 510 displays the SSID and connection key generated by the printer100. When it has been set on the setting screen 320 to use a fixed SSID,a fixed SSID is generated and displayed in the field 511. In contrast,when it has been set on the setting screen 320 to use a one-time SSID, arandom SSID is generated and displayed in the field 511.

The user who has checked the details displayed in the field 511 useshis/her mobile terminal 101 to search for surrounding access points, andselects an access point with the SSID displayed in the field 511 fromthe search result list. When the user enters the connection keydisplayed in the field 511 to the mobile terminal 101, wirelessconnection based on the access point mode is established between theprinter 100 and the mobile terminal 101. After wirelessly connecting themobile terminal 101 to the printer 100 using the access point mode, theuser selects on the mobile terminal 101 a photograph that the user wantsto print. When the user inputs a print instruction to the mobileterminal 101, the mobile terminal 101 uses wireless communication in theaccess point mode to transmit print data for printing the photographselected by the user to the printer 100. On receipt of the print data,the printer 100 executes printing based on the received print data on asheet.

When the printer 100 starts operating in the access point mode, theprinter 100 enters a standby state for receiving a request forestablishing wireless connection from an external device such as themobile terminal 101. When the printer 100 starts operating in the accesspoint mode, the mobile terminal 101 can find the printer 100 whensearching for surrounding access points. On receipt of a request from anexternal device for establishing wireless communication, the printer 100establishes wireless connection in the access point mode with theexternal device. After establishing the wireless connection, actual datacommunication (such as transmission of print data from the mobileterminal 101 to the printer 100) is executed between the printer 100 andthe external device.

The wireless connection screen 510 displays a stop button 512. The stopbutton 512 is for receiving from the user a stop instruction forstopping the operation in the access point mode. To stop the operationof the printer 100 in the access point mode, the user presses the stopbutton 512. When the user presses the stop button 512, the printer 100stops operating in the access point mode. The printer 100 also stopsoperating in the access point mode when the user logs out from theprinter 100.

Next, a process executed by the printer 100 when the user logs in to theprinter 100 will be described using a flowchart illustrated in FIG. 6.Each step illustrated in the flowchart in FIG. 6 is processed when theCPU 201 expands and executes a control program stored in a memory suchas the ROM 202 or the like in the RAM 203. Alternatively, the printer100 may be configured such that at least some of the steps of theflowchart illustrated in FIG. 6 are executed by the CPU 201, and theremaining steps are executed by a CPU (not illustrated) different fromthe CPU 201.

At first, in step S601, the CPU 201 determines whether to execute userauthentication. When the IC card reader 209 reads user information froman IC card, or when the user enters his/her user ID and password in theentry field 301 and the entry field 302 and presses the log-in button303, the CPU 201 determines to execute user authentication. The processproceeds to step S602.

Next in step S602, the CPU 201 determines whether a user indicated bythe user information is a user who is permitted to log in. Thisdetermination is done by checking whether the user information isregistered in the user management table 400. When the user informationis registered in the user management table 400 (the user authenticationis successful), the process proceeds to step S603. In step S603, the CPU201 executes log-in processing. The CPU 201 lets the user who has beensuccessfully authenticated log in to the printer 100, and controls theoperating section 208 to display the menu screen 310.

In contrast, when the user information is not registered in the usermanagement table 400 (the user authentication failed), it is determinedin step S602 that the user indicated by the user information is a userwho is not permitted to log in. The CPU 201 informs the user of theauthentication failure, and ends the process, without executing log-inprocessing.

Next, a process executed by the printer 100 when the user uses theaccess point mode and the printer 100 automatically stops operating inconjunction with the user's logging out will be described using aflowchart illustrated in FIG. 7. Each step illustrated in the flowchartin FIG. 7 is processed when the CPU 201 expands and executes a controlprogram stored in a memory such as the ROM 202 or the like in the RAM203. Alternatively, the printer 100 may be configured such that at leastsome of the steps of the flowchart illustrated in FIG. 7 are executed bythe CPU 201, and the remaining steps are executed by a CPU (notillustrated) different from the CPU 201.

In step S701, the CPU 201 determines whether the user has pressed thestart button 501. When the CPU 201 detects that the user has pressed thestart button 501, the process proceeds to step S702. In step S702, theCPU 201 controls the wireless LAN I/F 205 to start the operation in theaccess point mode. The wireless LAN I/F 205 generates a fixed SSID or aone-time SSID in accordance with the results of the settings configuredon the setting screen 320, and starts the operation in the access pointmode.

Next in step S703, the CPU 201 sets zero as the value of a variable N.The variable N is a variable for managing the number of devices withwhich wireless connection in the access mode has been established by theprinter 100. In the case of the first embodiment, the printer 100 cansimultaneously establish wireless connection in the access point modewith up to five devices. The value five is only one example of themaximum value of the number of concurrent connections, and the value maybe another value. Although the first embodiment describes that themaximum value of the number of concurrent connections remains unchangedeven when either of a fixed SSID and a one-time SSID is used, themaximum value of the number of concurrent connections may be madedifferent between the case of using a fixed SSID and the case of using aone-time SSID.

Next in step S704, the CPU 201 determines whether a request from anexternal device for establishing wireless connection has been received.When the wireless LAN I/F 205 receives a request from an external devicefor establishing wireless connection, the process proceeds to step S705.In contrast, when the wireless LAN I/F 205 does not receive a requestfrom an external device for establishing wireless connection, theprocess proceeds to step S709.

Next, step S705 will be described. In step S705, the CPU 201 determineswhether the value of the variable N is less than the maximum value ofthe number of concurrent connections. When the value of the variable N,that is, the number of devices with which wireless connection in theaccess point mode has been established at present, is less than themaximum value of the number of concurrent connections, the processproceeds to step S706. In step S706, the CPU 201 controls the wirelessLAN I/F 205 to establish wireless connection with the device, which hassent the request for establishing wireless connection. The wireless LANI/F 205 establishes wireless connection in the access point mode withthe device, which has sent the request for establishing wirelessconnection. In step S707, the CPU 201 increments the value of thevariable N by one. In contrast, when the value of the variable N, thatis, the number of devices with which wireless connection in the accesspoint mode has been established at present, is equal to the maximumvalue of the number of concurrent connections, the process proceeds tostep S708. In step S708, the CPU 201 rejects the request forestablishing wireless connection. The device, which has sent the requestfor establishing wireless connection, fails to establish wirelessconnection in the access point mode with the printer 100.

Next, step S709 will be described. In step S709, the CPU 201 determineswhether the user who is currently logged in to the printer 100 haslogged out from the printer 100. In the case of the first embodiment,the user logs out when the user presses the log-out button or when acertain period of time (such as five minutes) elapses without any useroperation. When the user who is currently logged in logs out from theprinter 100, the process proceeds to step S710. In contrast, when it isdetermined in step S709 that the user who is currently logged in has notlogged out from the printer 100, the process proceeds to step S711.

Next, step S710 will be described. In step S710, the CPU 201 determineswhether the value of the variable N is less than or equal to one. Whenthe value of the variable N, that is, the number of devices with whichwireless connection in the access point mode has been established atpresent, is less than or equal to one, the process proceeds to stepS712. In step S712, the CPU 201 controls the wireless LAN I/F 205 tostop the operation in the access point mode. Under control of the CPU201, the wireless LAN I/F 205 stops the operation in the access pointmode. In contrast, when the value of the variable N, that is, the numberof devices with which wireless connection in the access point mode hasbeen established at present, is greater than or equal to two, the CPU201 ends the process illustrated in the flowchart, without having thewireless LAN I/F 205 stop the operation in the access point mode. Theprinter 100 is characterized in that the printer 100 determines whetherto stop operating in the access point mode in conjunction with theuser's logging out, on the basis of the number of wireless connectionsestablished in the access point mode.

When the value of the variable N, that is, the number of devices withwhich wireless connection in the access point mode has been establishedat present, is zero, it is determined “Yes” in step S710, and thewireless LAN I/F 205 stops the operation in the access point mode. Thefact that the value of the variable N is zero can be determined thatthere is no user who uses the access point mode. Thus, when the value ofthe variable N is zero, the wireless LAN I/F 205 stops the operation inthe access point mode in conjunction with the user's logging out.

When the value of the variable N, that is, the number of devices withwhich wireless connection in the access point mode has been establishedat present, is one, it is determined “Yes” in step S710, and thewireless LAN I/F 205 stops the operation in the access point mode. Thefact that the value of the variable N is one can be determined that itis highly likely that only the user who is currently logged uses theaccess point mode, and no other users use the access point mode. Thus,when the value of the variable N is one, the wireless LAN I/F 205 stopsthe operation in the access point mode in conjunction with the user'slogging out.

When the value of the variable N, that is, the number of devices withwhich wireless connection in the access point mode has been establishedat present, is two or greater (plural), it is determined “No” in stepS710, and the wireless LAN I/F 205 does not stop the operation in theaccess point mode. When the value of the variable N is plural, it can bedetermined that it is highly likely that, besides the user who iscurrently logged in, other users also use the access point mode. If theoperation in the access point mode is stopped in this state inconjunction with the user's logging out, it becomes impossible for theother users to use the access point mode. Thus, when the value of thevariable N is plural, the wireless LAN I/F 205 does not stop theoperation in the access point mode even when the user logs out.

Next, step S711 will be described. In step S711, the CPU 201 determineswhether the user has pressed the stop button 512. When the CPU 201detects that the user has pressed the stop button 512, the processproceeds to step S712. In step S712, the CPU 201 controls the wirelessLAN I/F 205 to stop the operation in the access point mode, and thewireless LAN I/F 205 stops the operation in the access point mode. Incontrast, when the CPU 201 determines in step S711 that the user has notpressed the stop button 512, the process proceeds to step S704.

As has been described above, according to the first embodiment, theprinter 100 can stop operating in the access point in conjunction withthe user's logging out from the printer 100. In the case of the printer100, the wireless LAN I/F 205 operates in one of the infrastructure modeand the access point mode, and is incapable of simultaneously operatingin both the infrastructure mode and the access point mode. Thus, whenthe wireless LAN I/F 205 is operating in the access point mode, thewireless LAN I/F 205 can neither operate in the infrastructure mode norreceive print data from a PC via an external access point mode.Therefore, in the first embodiment, the wireless LAN I/F 205automatically stops the operation in the access point mode inconjunction with the user's logging out. By automatically stopping theoperation in the access point mode in conjunction with the user'slogging out, the operation mode of the wireless LAN I/F 205 can beswitched from the access point mode to the infrastructure mode.

Second Embodiment

A second embodiment will be described. In the second embodiment, aprocess of switching, on the basis of the type of SSID used in theaccess point mode, whether to stop the operation in the access pointmode in conjunction with the user's logging out will be described. Theconfiguration of the printer 100 is the same as that in the firstembodiment.

On the setting screen 320, the printer 100 sets one of a fixed SSID anda one-time SSID as an SSID used in the access point mode. In the secondembodiment, the maximum value of the number of concurrent connections inthe case of using a fixed SSID is plural (such as five), and the maximumvalue of the number of concurrent connections in the case of using aone-time SSID is one. In the case of the settings indicating the use ofa one-time SSID, it is characterized that the wireless LAN I/F 205 stopsthe operation in the access point mode in conjunction with the user'slogging out. In contrast, in the case of the settings indicating the useof a fixed SSID, the wireless LAN I/F 205 does not stop the operation inthe access point mode even when the user logs out.

This process will be described using a flowchart illustrated in FIG. 8.Each step illustrated in the flowchart in FIG. 8 is processed when theCPU 201 expands and executes a control program stored in a memory suchas the ROM 202 or the like in the RAM 203. Alternatively, the printer100 may be configured such that at least some of the steps of theflowchart illustrated in FIG. 8 are executed by the CPU 201, and theremaining steps are executed by a CPU (not illustrated) different fromthe CPU 201.

In step S801, the CPU 201 determines whether the user who is currentlylogged in to the printer 100 has logged out from the printer 100. In thecase of the second embodiment, the user logs out when the user pressesthe log-out button or when a certain period of time (such as fiveminutes) elapses without any user operation. When the user who iscurrently logged in logs out from the printer 100, the process proceedsto step S802. In contrast, when it is determined in step S801 that theuser who is currently logged in has not logged out from the printer 100,the process proceeds to step S803. In step S803, the CPU 201 determineswhether the user has pressed the stop button 512. When the CPU 201detects that the user has pressed the stop button 512, the processproceeds to step S804.

Step S802 will be described. In step S802, the CPU 201 determineswhether the settings regarding the access point mode, which areconfigured on the printer 100, indicate the use of a one-time SSID. Thisdetermination is executed by checking the results of the settingsconfigured on the setting screen 320. When the settings regarding theaccess point mode indicate the use of a one-time SSID, the processproceeds to step S804. In step S804, the CPU 201 controls the wirelessLAN I/F 205 to stop the operation in the access point mode. Undercontrol of the CPU 201, the wireless LAN I/F 205 stops the operation inthe access point mode. In contrast, when the settings regarding theaccess point mode indicate the use of a fixed SSID, the CPU 201 ends theprocess illustrated in the flowchart, without having the wireless LANI/F 205 stop the operation in the access point mode.

When the settings regarding the access point mode indicate the use of aone-time SSID, it is determined “Yes” in step S802, and the wireless LANI/F 205 stops the operation in the access point mode. When the settingsregarding the access point mode indicate the use of a one-time SSID, themaximum value of the number of concurrent wireless connections in theaccess point mode is one. The fact that the maximum value of the numberof concurrent connections is one can be determined that the use of theaccess point mode ends when the user logs out, since it is assumed thatthe access point mode is used only by the user who is currently loggedin. Thus, when the settings regarding the access point mode indicate theuse of a one-time SSID, the wireless LAN I/F 205 stops the operation inthe access point mode in conjunction with the user's logging out.

When the settings regarding the access point mode indicate the use of afixed SSID, it is determined “No” in step S802, and the wireless LAN I/F205 does not stop the operation in the access point mode. When thesettings regarding the access point mode indicate the use of a fixedSSID, the maximum value of the number of concurrent wireless connectionsin the access point mode is plural (such as five). The fact that themaximum value of the number of concurrent connections is plural can bedetermined that it is preferable that the printer 100 not stop operatingin the access point mode since it is assumed that the access point modeis used by a plurality of users with their desired timings. When thesettings regarding the access point mode indicate the use of a fixedSSID, the wireless LAN I/F 205 does not stop the operation in the accesspoint mode and continues the operation in the access point mode evenwhen the user logs out from the printer 100.

As has been described above, the printer 100 is characterized in thatthe printer 100 determines whether to stop operating in the access pointmode in conjunction with the user's logging out, on the basis of thetype of SSID used in the access point mode. When an SSID used in theaccess point mode is a one-time SSID, the printer 100 stops operating inthe access point mode in conjunction with the user's logging out. Incontrast, when an SSID used in the access point mode is a fixed SSID,the printer 100 does not stop operating in the access point mode evenwhen the user logs out.

Although the second embodiment has given a one-time SSID as an exampleof an SSID where the maximum value of the number of concurrentconnections is one, the present application is applicable to, instead ofa one-time SSID, any other type of SSID as long as the maximum value ofthe number of concurrent connections is one. As another type of SSID,for example, the setting indicating that an SSID corresponding to a useris generated and that SSID is used in the access point mode isconceivable. In the case of using an SSID corresponding to a user, theprinter 100 switches the to-be-used SSID in accordance with a user whois currently logged in. For example, when a user A is currently loggedin, the printer 100 uses a user SSID for the user A; and, when a user Bis currently logged in, the printer 100 uses a user SSID for the user B.It is preferable that the maximum value of the number of concurrentconnections be one even in such a case where an SSID corresponding to auser is used in the access point mode, and it is also preferable thatthe printer 100 stop operating in the access point mode in conjunctionwith the user's logging out.

Other Embodiments

Embodiment(s) of the present invention can also be realized by acomputer of a system or apparatus that reads out and executes computerexecutable instructions (e.g., one or more programs) recorded on astorage medium (which may also be referred to more fully as a‘non-transitory computer-readable storage medium’) to perform thefunctions of one or more of the above-described embodiment(s) and/orthat includes one or more circuits (e.g., application specificintegrated circuit (ASIC)) for performing the functions of one or moreof the above-described embodiment(s), and by a method performed by thecomputer of the system or apparatus by, for example, reading out andexecuting the computer executable instructions from the storage mediumto perform the functions of one or more of the above-describedembodiment(s) and/or controlling the one or more circuits to perform thefunctions of one or more of the above-described embodiment(s). Thecomputer may comprise one or more processors (e.g., central processingunit (CPU), micro processing unit (MPU)) and may include a network ofseparate computers or separate processors to read out and execute thecomputer executable instructions. The computer executable instructionsmay be provided to the computer, for example, from a network or thestorage medium. The storage medium may include, for example, one or moreof a hard disk, a random-access memory (RAM), a read only memory (ROM),a storage of distributed computing systems, an optical disk (such as acompact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™),a flash memory device, a memory card, and the like.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2015-232516, filed Nov. 28, 2015, which is hereby incorporated byreference herein in its entirety.

1. A communication apparatus to which a user can log in, comprising: awireless communication unit configured to include a direct wirelesscommunication function of performing wireless communication with anexternal device without having a relay device therebetween; adetermination unit configured to determine, in accordance with a numberof wireless connections established by the direct wireless communicationfunction, whether to stop the direct wireless communication function inresponse to the user's logging out from the communication apparatus; anda controller configured to control the wireless communication unit tostop the direct wireless communication function in response todetermining by the determination unit to stop the direct wirelesscommunication function.
 2. The communication apparatus according toclaim 1, wherein the determination unit determines to stop the directwireless communication function when the number of wireless connectionsis zero.
 3. The communication apparatus according to claim 1, whereinthe determination unit determines to stop the direct wirelesscommunication function when the number of wireless connections is zeroor one.
 4. The communication apparatus according to claim 1, wherein thecommunication apparatus is a printer.
 5. The communication apparatusaccording to claim 1, wherein the direct wireless communication functionis an access point mode where the communication apparatus acts as anaccess point.
 6. A communication apparatus to which a user can log in,comprising: a wireless communication unit configured to include a directwireless communication function of performing wireless communicationwith an external device without having a relay device therebetween; anda controller configured to control the wireless communication unit tostop the direct wireless communication function in response to theuser's logging out from the communication apparatus when a certainsetting is configured on the communication apparatus, the certainsetting indicating a service set identifier (SSID) used in the directwireless communication function.
 7. The communication apparatusaccording to claim 6, wherein, when the certain setting is notconfigured on the communication apparatus, the wireless communicationunit does not stop the direct wireless communication function at a timepoint at which the user logs out from the communication apparatus. 8.The communication apparatus according to claim 6, wherein the certainsetting is a setting indicating that an SSID where a maximum value of anumber of concurrent wireless connections is one is used.
 9. Thecommunication apparatus according to claim 6, wherein the certainsetting is a setting indicating that a randomly-generated SSID is used.10. The communication apparatus according to claim 6, wherein thecommunication apparatus is a printer.
 11. The communication apparatusaccording to claim 6, wherein the direct wireless communication functionis an access point mode where the communication apparatus acts as anaccess point.
 12. A method for controlling a communication apparatus towhich a user can log in, the communication apparatus including a directwireless communication function of performing wireless communicationwith an external device without having a relay device therebetween,comprising: determining, in accordance with a number of wirelessconnections established by the direct wireless communication function,whether to stop the direct wireless communication function in responseto the user's logging out from the communication apparatus; andcontrolling the communication apparatus to stop the direct wirelesscommunication function in response to determining to stop the directwireless communication function.
 13. A method for controlling acommunication apparatus to which a user can log in, the communicationapparatus including a direct wireless communication function ofperforming wireless communication with an external device without havinga relay device therebetween, comprising: controlling the communicationapparatus to stop the direct wireless communication function in responseto the users logging out from the communication apparatus when a certainsetting is configured on the communication apparatus, the certainsetting indicating an SSID used in the direct wireless communicationfunction.